package com.tencent.search.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 课程表
 * 
 * @author ian
 * @email ian.ren121@gmail.com
 * @date 2022-04-21 19:34:30
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "course",type = "doc")
public class CourseEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 课程ID
	 */
	@Id
	private Long id;
	/**
	 * 标题
	 */
	//@Field(type = FieldType.Keyword)
	private String title;
	/**
	 * 用户ID
	 */
	private Integer teacher_id;
	/**
	 * 创建日期
	 */
	@JSONField(format = "YYYY-MM-dd")
	@DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd'T'HH:mm:ss")
	private Date create_time;
	/**
	 * 参加人数
	 */
	private Integer jointimes;
	/**
	 * 开课时间
	 */
	@JSONField(format = "YYYY-MM-dd")
	@DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd'T'HH:mm:ss")
	private Date start_time;
	/**
	 * 结课时间
	 */
	@JSONField(format = "YYYY-MM-dd")
	@DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd'T'HH:mm:ss")
	private Date end_time;
	/**
	 * 课程描述
	 */
	private String description;
	/**
	 * 课程目标
	 */
	private String goal;
	/**
	 * 课程大纲
	 */
	private String outline;
	/**
	 * 课程价格
	 */
	private BigDecimal price;
	/**
	 * 课程封面图
	 */
	private String course_picture;
	/**
	 * 类型名称
	 */
	private String course_level;
	/**
	 * 用户名
	 */
	private String teachername;
	/**
	 * 方向ID
	 */
	private Integer cid;
	/**
	 * 分类ID
	 */
	private Integer area_id;
	/**
	 * 总时长
	 */
	private Long total_duration;

}
